package org.jeecg.modules.app.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.checkerframework.checker.units.qual.A;
import org.jeecg.modules.app.entity.ShopInfoRemake;
import org.jeecg.modules.app.mapper.ShopInfoRemakeMapper;
import org.jeecg.modules.app.mapper.ShopMapper;
import org.jeecg.modules.app.service.ShopInfoRemakeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 李圳川
 * @version 1.0
 * @date 2022/6/24 0:59
 * @content
 */
@Service
public class ShopInfoRemakeServiceImpl implements ShopInfoRemakeService {

    @Autowired
    private ShopInfoRemakeMapper shopInfoRemakeMapper;

    @Autowired
    private ShopMapper shopMapper;

    @Override
    public String insert(ShopInfoRemake shopInfoRemake) {
        shopInfoRemakeMapper.insert(shopInfoRemake);
        return shopInfoRemake.getId();
    }

    /**
     * 查询商家的评论
     * @param id
     * @return
     */
    @Override
    public List<ShopInfoRemake> findShopInfoById(String id) {
        List<ShopInfoRemake> remakeList = shopMapper.selectShopRemakeById(id);
        return remakeList;
    }
}
